package src.lab02.test01.Test19;

public class Test19 {
    public static void main(String[] args) {
        String H="Hello Word!";
        StringBuffer stringBuffer = new StringBuffer();
        for (int i = 0; i<H.length();i++) {
           if (H.charAt(i)<97&&H.charAt(i)>65){

               stringBuffer.append((char)(H.charAt(i)+32));

           }else if (96<H.charAt(i)&&H.charAt(i)<129)stringBuffer.append((char) (H.charAt(i)-32));
        }
        System.out.println(stringBuffer.toString());
        System.out.println("Hello Word!");
        //实现字符串的大小写转换并倒序输出，如输入为“HelloWord”，输出为“DROwOLLEH”。
        char[] h=new char[9];
        char[] h2=new char[9];
        h [0]='h';
        h[1]='E';
        h[2]='L';
        h[3]='L';
        h[4]='O';
        h[5]='w';
        h[6]='O';
        h[7]='R';
        h[8]='D';
        for (int i=0;i<9;i++){

            h2[8-i]=h[i];

        }
        for (int i=0;i<9;i++){
            System.out.print(h2[i]);
        }



    }

}
